from celery import Celery
from celery.utils.log import get_task_logger
from config import celeryconfig
import os
import sys

BASE_PARH = os.path.dirname(os.path.dirname(__file__))
# 增加日志记录 方便日志查找问题
log = get_task_logger(__name__)
sys.path.insert(0, BASE_PARH)
celery = Celery("celery_task")
celery.config_from_object(celeryconfig)